/* Mohamed Zaid Bhura
 * CSE 2102
 * Lab 1
 * This is the main class file.
 */

import javax.swing.*;

public class PaintDemo {
	
	public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
            	createGUI();
            }
        });
	}
	
	private static void createGUI() {
		System.out.println("Created GUI on EDT? "+
		        SwingUtilities.isEventDispatchThread());
		JFrame frame = new JFrame("Yay, first 2102 lab!!");
		frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
		DemoPanel panel = new DemoPanel();
		ButtonPanel buttonPanel = new ButtonPanel(panel);
		frame.add(panel, java.awt.BorderLayout.CENTER);
		frame.add(buttonPanel, java.awt.BorderLayout.SOUTH);
		frame.add(panel);
		frame.pack();
		frame.setVisible(true);
	}
}

